.class public Lcom/brixd/niceapp/model/AppRecommendModel;
.super Ljava/lang/Object;
.source "AppRecommendModel.java"

# interfaces
.implements Ljava/io/Serializable;


# static fields
.field private static final serialVersionUID:J = -0x777a408f76d12383L


# instance fields
.field public coverUrl:Ljava/lang/String;

.field public desc:Ljava/lang/String;

.field public downloadType:Ljava/lang/String;

.field public downloadUrl:Ljava/lang/String;

.field public iconUrl:Ljava/lang/String;

.field public linkUrl:Ljava/lang/String;

.field public minSdkVersion:I

.field public packageName:Ljava/lang/String;

.field public title:Ljava/lang/String;


# direct methods
.method public constructor <init>()V
    .registers 1

    .prologue
    .line 10
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method

.method public static parseAppRecommendModel(Lorg/json/JSONObject;)Ljava/util/List;
    .registers 8
    .param p0, "jo"    # Lorg/json/JSONObject;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lorg/json/JSONObject;",
            ")",
            "Ljava/util/List",
            "<",
            "Lcom/brixd/niceapp/model/AppRecommendModel;",
            ">;"
        }
    .end annotation

    .prologue
    const/4 v2, 0x0

    .line 23
    if-nez p0, :cond_4

    .line 54
    :cond_3
    return-object v2

    .line 26
    :cond_4
    const-string v6, "entrance"

    invoke-virtual {p0, v6}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v4

    .line 27
    .local v4, "entranceJo":Lorg/json/JSONObject;
    if-eqz v4, :cond_3

    .line 31
    const-string v6, "app_menu"

    invoke-virtual {v4, v6}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v3

    .line 32
    .local v3, "appRecommendsJa":Lorg/json/JSONArray;
    if-eqz v3, :cond_3

    invoke-virtual {v3}, Lorg/json/JSONArray;->length()I

    move-result v6

    if-eqz v6, :cond_3

    .line 36
    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    .line 37
    .local v2, "appRecommendModels":Ljava/util/List;, "Ljava/util/List<Lcom/brixd/niceapp/model/AppRecommendModel;>;"
    const/4 v5, 0x0

    .local v5, "i":I
    :goto_20
    invoke-virtual {v3}, Lorg/json/JSONArray;->length()I

    move-result v6

    if-ge v5, v6, :cond_3

    .line 38
    new-instance v0, Lcom/brixd/niceapp/model/AppRecommendModel;

    invoke-direct {v0}, Lcom/brixd/niceapp/model/AppRecommendModel;-><init>()V

    .line 39
    .local v0, "appRecommendModel":Lcom/brixd/niceapp/model/AppRecommendModel;
    const/4 v6, 0x0

    invoke-virtual {v3, v6}, Lorg/json/JSONArray;->optJSONObject(I)Lorg/json/JSONObject;

    move-result-object v1

    .line 40
    .local v1, "appRecommendModelJo":Lorg/json/JSONObject;
    const-string v6, "title"

    invoke-virtual {v1, v6}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    iput-object v6, v0, Lcom/brixd/niceapp/model/AppRecommendModel;->title:Ljava/lang/String;

    .line 41
    const-string v6, "desc"

    invoke-virtual {v1, v6}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    iput-object v6, v0, Lcom/brixd/niceapp/model/AppRecommendModel;->desc:Ljava/lang/String;

    .line 42
    const-string v6, "cover_url"

    invoke-virtual {v1, v6}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    iput-object v6, v0, Lcom/brixd/niceapp/model/AppRecommendModel;->coverUrl:Ljava/lang/String;

    .line 43
    const-string v6, "download_priority"

    invoke-virtual {v1, v6}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    iput-object v6, v0, Lcom/brixd/niceapp/model/AppRecommendModel;->downloadType:Ljava/lang/String;

    .line 44
    const-string v6, "download_url"

    invoke-virtual {v1, v6}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    iput-object v6, v0, Lcom/brixd/niceapp/model/AppRecommendModel;->downloadUrl:Ljava/lang/String;

    .line 45
    const-string v6, "icon_url"

    invoke-virtual {v1, v6}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    iput-object v6, v0, Lcom/brixd/niceapp/model/AppRecommendModel;->iconUrl:Ljava/lang/String;

    .line 46
    const-string v6, "link_url"

    invoke-virtual {v1, v6}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    iput-object v6, v0, Lcom/brixd/niceapp/model/AppRecommendModel;->linkUrl:Ljava/lang/String;

    .line 47
    const-string v6, "min_sdk_version"

    invoke-virtual {v1, v6}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v6

    iput v6, v0, Lcom/brixd/niceapp/model/AppRecommendModel;->minSdkVersion:I

    .line 48
    const-string v6, "package_name"

    invoke-virtual {v1, v6}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    iput-object v6, v0, Lcom/brixd/niceapp/model/AppRecommendModel;->packageName:Ljava/lang/String;

    .line 50
    invoke-interface {v2, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 37
    add-int/lit8 v5, v5, 0x1

    goto :goto_20
.end method
